package cn.org.farseer.sweetftp.rcp.util;

import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;

/**
 * 作者 : [Farseer.org] 简洋  —  2009-7-27
 * 
 * 项目 : [Farseer.org] SweetFTP
 */
public class WindowUtil
{

	
	public static Point getMiddelPosition(int oWidth,int oHeight)
	{
		Rectangle  clientArea = Display.getCurrent().getClientArea();
		int x = (clientArea.width - oWidth) / 2;
		int y = (clientArea.height - oHeight) / 2;
		return new Point(x,y);
	}
}
